﻿using Aluetjen.EmailService.Domain.Services;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rhino.Mocks;

namespace Aluetjen.EmailService.Web.Tests
{
    [TestClass]
    public class EmailServiceTests
    {
        private IPipelineProcessorService _pipelineProcessor;

        private void SetUpMocks(bool usePipelineProcessorStub = true)
        {
            _pipelineProcessor = GenerateMock<IPipelineProcessorService>(usePipelineProcessorStub);
        }

        private static T GenerateMock<T>(bool usePipelineProcessorStub) where T : class
        {
            return usePipelineProcessorStub ? MockRepository.GenerateStub<T>() : MockRepository.GenerateMock<T>();
        }

        [TestMethod]
        public void Ctor()
        {
            SetUpMocks();

            new EmailService(_pipelineProcessor);
        }
    }
}
